package cn.cljh.day8_18.task.test2;

public class Student {
    private int id;
    private String name;
    private int age;
    private int chinese;
    private int english;
    private int math;

    public int sum(){
        int result = this.chinese + this.english + this.math;
        return result;
    }
    public Student() {
    }

    public Student(int id, String name, int age, int chinese, int english, int math) {
        this.id = id;
        this.name = name;
        this.age = age;
        this.chinese = chinese;
        this.english = english;
        this.math = math;
    }

    @Override
    public String toString() {
        return id+"\t"+name+"\t"+age+"\t"+chinese+"\t"+english+"\t"+math+"\t"+sum();
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public int getChinese() {
        return chinese;
    }

    public void setChinese(int chinese) {
        this.chinese = chinese;
    }

    public int getEnglish() {
        return english;
    }

    public void setEnglish(int english) {
        this.english = english;
    }

    public int getMath() {
        return math;
    }

    public void setMath(int math) {
        this.math = math;
    }
}
